package com.dingwen.treasure.business.service.impl;

import cn.hutool.core.util.ReflectUtil;
import com.baomidou.mybatisplus.extension.service.IService;

import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;

/**
 * IService 泛型测试
 *
 * @author dingwen
 * @date 2022/05/04
 */
@SuppressWarnings("ALL")
public abstract class AbstractIServiceGenericsTest<S, U> {

    public void test() throws Exception {
        Class<S> sClass = com.dingwen.treasure.base.util.ReflectUtil.getClassForGeneric(0, this);
        Method saveBatchMethod = ReflectUtil.getMethodByName(IService.class, "saveBatch");
        List<S> sList = new ArrayList<>();
        saveBatchMethod.invoke(sList);

    }
}


